1. Field of the Invention
The present invention relates to a device having an internal circuit for performing a predetermined processing and outputting a signal from an output terminal to the outside and a clock generation circuit such as an oscillation circuit for generating a clock signal and providing the generated clock signal to the internal circuit and other circuits.
2. Description of the Related Art
Conventionally, a test for an oscillation circuit (for example a check for a duty of an output waveform from an oscillation circuit or for a stable time of oscillation) is performed such that, as shown in FIG. 1, microcomputer 1C, including an oscillation circuit 10 (comprising an inverter 2, feedback resistance 3, a hysteresis inverter 4 and an oscillator 6) and an internal circuit 5 (including a CPU, a timer, a serial interface circuit and so on), is provided with a dedicated clock output terminal 12 separately from an output terminal 7 to supply an output waveform from oscillation circuit 10 to the outside of the microcomputer, and the waveform is observed by means of an oscilloscope.
Alternatively, as shown in FIG. 2, a CPU 5a is operated in a test mode such as a romless mode, in which a transmission clock 5c synchronized with a certain group of divided clocks 11a is outputted from a serial interface circuit 5b to the outside of a microcomputer 1C, for example. The clock is observed to thereby indirectly validate the operation of a clock division circuit 11.
The above-mentioned prior arts, however, have the following disadvantages: Firstly, a dedicated test terminal is required other than a terminal used during normal operation. Secondly, the test is more complicated when the internal circuit is operated for test because a dedicated instruction is required when the internal circuit is operated.
It is an object of the present invention to provide a device of the type described above which does not require a dedicated test terminal and is capable of performing a test for a clock signal in a simple manner.
In order to achieve the above object, the present invention has, in a device, a clock output circuit for receiving a test mode signal and outputting a clock signal or an output signal from an internal circuit to an output terminal in accordance with the test mode signal.
Thus, a dedicated test mode and the clock output circuit make it possible to easily perform the test for an internal clock without providing a dedicated terminal.
The above and other objects, features and advantages of the present invention will become apparent from the following description with reference to the accompanying drawings which illustrate examples of the present invention.